#include<bits/stdc++.h>
using namespace std;
long long a[100010],b[100010];
long long n,m,md,mi,nn,s;

 int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    for(long long i=0;i<n;i++){
        cin >> a[i];
    }
    sort(a,a+n);
    mi=a[0];
    for(long long i=0;i<=n;i++){
        if(a[i]>mi||a[i]==0){
            b[m]=i-md;
            md+=b[m];
            m++;
            mi=a[i];
        }
    }
    for(long long i=0;i<m;i++){
        if(b[i]>b[i+1]){
            nn+=b[i]-b[i+1];
        }
    }
    cout << nn;
    return 0;
}
